package com.leaves.leetcode;

import com.leaves.Constant;
import com.leaves.leetcode.array.t1052_MaxSatisfied.T1052Main;
import com.leaves.leetcode.array.t1343_NumOfSubarrays.T1343Main;
import com.leaves.leetcode.array.t1534_CountGoodTriplets.T1534Main;
import com.leaves.leetcode.array.t1995_CountSpecialQuadruplets.T1995Main;
import com.leaves.leetcode.array.t15_3Sum.T15Main;
import com.leaves.leetcode.array.t16_3SumClosest.T16Main;
import com.leaves.leetcode.array.t18_4Sum.T18Main;
import com.leaves.leetcode.array.t1_Easy_twoSum.T1Main;
import com.leaves.leetcode.array.t454_4SumⅡ.T454Main;
import com.leaves.leetcode.array.t643_FindMaxAverage.T643Main;
import com.leaves.leetcode.string.t1456_MaxVowels.T1456Main;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum Problem {
    TwoSum(
            "1",
            new Category[]{Category.ARRAY},
            "哈希表",
            Constant.DIFFICULTY_EASY,
            Constant.DIFFICULTY_EASY,
            Constant.REVIEW_NOTRECOMMENDED,
            T1Main.class,
            "https://leetcode.cn/problems/two-sum/"
    ),
    TreeSum(
            "15",
            new Category[]{Category.ARRAY},
            "排序 + 双指针",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_MEDIUM,
            Constant.REVIEW_HIGHLYRECOMMENDED,
            T15Main.class,
            "https://leetcode.cn/problems/3sum/"
    ),
    TreeSumClosest(
            "16",
            new Category[]{Category.ARRAY},
            "排序 + 双指针 + 优化剪枝",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_MEDIUM,
            Constant.REVIEW_HIGHLYRECOMMENDED,
            T16Main.class,
            "https://leetcode.cn/problems/3sum-closest/"
    ),
    FourSum(
            "18",
            new Category[]{Category.ARRAY},
            "排序 + 双指针 + 优化剪枝",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_MEDIUM,
            Constant.REVIEW_HIGHLYRECOMMENDED,
            T18Main.class,
            "https://leetcode.cn/problems/4sum/"
    ),
    FourSumII(
            "454",
            new Category[]{Category.ARRAY},
            "分组 + 哈希表",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_EASY,
            Constant.REVIEW_HIGHLYRECOMMENDED, T454Main.class, "https://leetcode.cn/problems/4sum-ii/"
    ),
    MxSatisfied(
            "1052",
            new Category[]{Category.ARRAY, Category.SLIDINGWINDOW},
            "固定长度滑动窗口",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_EASY,
            Constant.REVIEW_GENERAL, T1052Main.class, "https://leetcode.cn/problems/grumpy-bookstore-owner/"
    ),
    MaxVowels(
            "1456",
            new Category[]{Category.STRING, Category.SLIDINGWINDOW},
            "固定长度滑动窗口",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_EASY,
            Constant.REVIEW_GENERAL, T1456Main.class, "https://leetcode.cn/problems/maximum-number-of-vowels-in-a-substring-of-given-length/"
    ),
    FindMaxAverage(
            "643",
            new Category[]{Category.ARRAY, Category.SLIDINGWINDOW},
            "固定长度滑动窗口",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_EASY,
            Constant.REVIEW_GENERAL,
            T643Main.class,
            "https://leetcode.cn/problems/maximum-average-subarray-i/"
    ),
    NumOfSubarrays(
            "1343",
            new Category[]{Category.ARRAY, Category.SLIDINGWINDOW},
            "固定长度滑动窗口",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_EASY,
            Constant.REVIEW_GENERAL,
            T1343Main.class,
            "https://leetcode.cn/problems/number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold/"
    ),
    CountGoodTriplets(
            "1534",
            new Category[]{Category.STRING, Category.SLIDINGWINDOW},
            "固定长度滑动窗口",
            Constant.DIFFICULTY_MEDIUM,
            Constant.DIFFICULTY_EASY,
            Constant.REVIEW_HIGHLYRECOMMENDED,
            T1534Main.class,
            "https://leetcode.cn/problems/count-good-triplets"
    ),
    CountSpecialQuadruplets(
            "1995",
            new Category[]{Category.ARRAY},
            "中间分组 + 中间开始遍历 + 逆序遍历 + 哈希表",
            Constant.DIFFICULTY_EASY,
            Constant.DIFFICULTY_MEDIUM,
            Constant.REVIEW_HIGHLYRECOMMENDED,
            T1995Main.class,
            "https://leetcode.cn/problems/count-special-quadruplets"
    );




    private String serialNumber; // 序号
    private Category[] category; // 类别
    private String tips; // 提示
    private String standardDifficulty; // 标准难度
    private String intuitiveDifficulty; // 直观难度
    private String reviewIndex; // 建议复习指数
    private Class unitTestingClass; // 入口类
    private String link; // 题目链接

    public UnitTesting getUnitTesting() {
        UnitTesting o = null;
        try {
            o = (UnitTesting) this.unitTestingClass.newInstance();
        } catch (InstantiationException | IllegalAccessException e) {
            throw new RuntimeException(e);
        }
        return o;

    }

}
